'use client';

import { App, ConfigProvider, notification } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import { useEffect } from 'react';
import { usePathname } from 'next/navigation';

const ClientLayout = ({ children }: { children: React.ReactNode }) => {
  useEffect(() => {
    // 配置全局通知
    notification.config({
      placement: 'topRight',
      duration: 10,
      maxCount: 3,
    });
  }, []);

  return (
    // 使用 ConfigProvider 和 App 组件包裹以支持全局消息提示
    <ConfigProvider locale={zhCN}>
      <App>
        {children}
      </App>
    </ConfigProvider>
  );
};

export default ClientLayout; 